package com.timer.taskRule.service.impl;

import com.timer.taskRule.exception.TaskException;
import com.timer.taskRule.service.TaskService;
import org.springframework.stereotype.Service;

@Service
public class TaskServiceImpl implements TaskService {

	@Override
	public void testException() {

		for (int i = 0; i < 10; i++) {
			try {
				if(i % 2 == 0){
					throw new TaskException(-1,"第" + i + "个失败");
				}
			}catch (Exception e) {

			}

		}
	}


	@Override
	public void poxyTest() {
		System.out.println("poxyTest");
	}
}
